<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> 
    <title>通过docker运行vire-benchmark压测镜像 - 天地维杰网</title>
    <meta name="keywords" content="系统架构,shutdown,不与天斗,Domino,博客,程序员,架构师,笔记,技术,分享,java,Redis">
    
    <meta property="og:title" content="通过docker运行vire-benchmark压测镜像">
    <meta property="og:site_name" content="天地维杰网">
    <meta property="og:image" content="/img/author.jpg"> 
    <meta name="title" content="通过docker运行vire-benchmark压测镜像 - 天地维杰网" />
    <meta name="description" content="通过docker运行vire-benchmark压测镜像对redis进行压力测试" />
     
    <link rel="shortcut icon" href="http://www.shutdown.cn/img/favicon.ico" />
    <link rel="apple-touch-icon" href="http://www.shutdown.cn/img/apple-touch-icon.png" />
    <link rel="apple-touch-icon-precomposed" href="http://www.shutdown.cn/img/apple-touch-icon.png" />
    <link href="http://www.shutdown.cn/js/vendor/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />
    <link href="http://www.shutdown.cn/js/vendor/fancybox/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />
    <link href="http://www.shutdown.cn/css/main.css" rel="stylesheet" type="text/css" />
    <link href="http://www.shutdown.cn/css/syntax.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" id="hexo.configuration">
  var NexT = window.NexT || {};
  var CONFIG = {
    scheme: 'Pisces',
    sidebar: {"position":"left","display":"post"},
     fancybox: true, 
    motion: true
  };
</script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7826003325059020" crossorigin="anonymous"></script>
</head>
<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">
<div class="container one-collumn sidebar-position-left page-home  ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"> <div class="site-meta  custom-logo ">

  <div class="custom-logo-site-title">
    <a href="http://www.shutdown.cn"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">天地维杰网</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
  <p class="site-subtitle">人如秋鸿来有信，事若春梦了无痕</p>
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
    <ul id="menu" class="menu">
      
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />首页
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/redis/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-battery-full"></i> <br />Redis
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/java/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-coffee"></i> <br />java
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/linux/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-linux"></i> <br />linux
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/daily/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-bug"></i> <br />日常问题
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/spring/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-child"></i> <br />Spring和Springboot
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/mac/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-fire"></i> <br />Mac相关
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/middleware/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-gavel"></i> <br />中间件
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/jiagou/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-rocket"></i> <br />架构
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/python/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-ship"></i> <br />python
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/front/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-bolt"></i> <br />前端
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/jvm/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-balance-scale"></i> <br />jvm
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/c/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-battery-empty"></i> <br />c语言
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/web3/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-web3"></i> <br />web3
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/post/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />归档
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/about/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />关于
          </a>
        </li>
      
      <li class="menu-item menu-item-search">
        <a href="javascript:;" class="popup-trigger"> <i class="menu-item-icon fa fa-search fa-fw"></i> <br /> 搜索</a>
      </li>
    </ul>
    <div class="site-search">
      <div class="popup">
 <span class="search-icon fa fa-search"></span>
 <input type="text" id="local-search-input">
 <div id="local-search-result"></div>
 <span class="popup-btn-close">close</span>
</div>

    </div>
</nav>

 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            
<section id="posts" class="posts-expand">
  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <header class="post-header">
      <h1 class="post-title" itemprop="name headline">
        <a class="post-title-link" href="http://www.shutdown.cn/post/run-vire-benchmark-mirror-to-do-stress-test-/" itemprop="url">
        通过docker运行vire-benchmark压测镜像
        </a>
      </h1>
      <div class="post-meta">
      <span class="post-time">
<span class="post-meta-item-icon">
    <i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">时间：</span>
<time itemprop="dateCreated" datetime="2016-03-22T13:04:35+08:00" content="2022-08-18">
    2022-08-18
</time>
</span> 
      

  <span class="post-category" >
  &nbsp; | &nbsp;
  <span class="post-meta-item-icon">
    <i class="fa fa-folder-o"></i>
  </span>
  <span class="post-meta-item-text">分类：</span>
  
    <span itemprop="about" itemscope itemtype="https://schema.org/Thing">
      <a href="http://www.shutdown.cn/categories/redis" itemprop="url" rel="index">
        <span itemprop="name">redis</span>
      </a>
      &nbsp; 
    </span>
  
</span>


      
 <span>
&nbsp; | &nbsp;
<span class="post-meta-item-icon">
    <i class="fa fa-eye"></i>
</span>
<span class="post-meta-item-text">转载</span>
</span>

       <span>
&nbsp; | &nbsp;
<span class="post-meta-item-icon">
    <i class="fa fa-eye"></i>
</span>
<span class="post-meta-item-text">阅读：</span>
<span class="leancloud-visitors-count">493 字 ~1分钟</span>
</span>
      </div>
    </header>
    <div class="post-body" itemprop="articleBody">
    
    <div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-fallback" data-lang="fallback"> 文章系转载，便于整理和分类，原文地址：https://www.putianhui.cn/posts/d4ffdafb91fc/</code></pre></div>
    

    <div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell"><span style="color:#8f5902;font-style:italic"># 搜索 vire-benchmark 镜像</span>
~ % docker search vire-benchmark
NAME                       DESCRIPTION   STARS     OFFICIAL   AUTOMATED
putianhui/vire-benchmark                 <span style="color:#0000cf;font-weight:bold">0</span>

<span style="color:#8f5902;font-style:italic"># 下载镜像</span>
~ % docker pull putianhui/vire-benchmark
Using default tag: latest
latest: Pulling from putianhui/vire-benchmark
284055322776: Pull <span style="color:#204a87">complete</span>
da8424d6ea80: Pull <span style="color:#204a87">complete</span>
eddcec7e0bf0: Pull <span style="color:#204a87">complete</span>
Digest: sha256:def2915a9ce4647fcf9817e71b9499c4bed65622b968399cd0b1116139d7631a
Status: Downloaded newer image <span style="color:#204a87;font-weight:bold">for</span> putianhui/vire-benchmark:latest
docker.io/putianhui/vire-benchmark:latest

<span style="color:#8f5902;font-style:italic"># 查看镜像</span>
~ % docker images
REPOSITORY                            TAG       IMAGE ID       CREATED         SIZE
putianhui/vire-benchmark              latest    c117f38c9c30   <span style="color:#0000cf;font-weight:bold">4</span> months ago    68.9MB

<span style="color:#8f5902;font-style:italic"># 启动容器</span>
~ % docker run -d --name vire-benchmark putianhui/vire-benchmark
813e5be9bd1521d56fd917eb0fafadf80c05439123ebcc802928ca64a296a308

<span style="color:#8f5902;font-style:italic"># 进入容器</span>
~ % docker <span style="color:#204a87">exec</span> -it vire-benchmark /bin/bash

<span style="color:#8f5902;font-style:italic"># 执行压测</span>
root@813e5be9bd15:/# vire-benchmark -h 10.4.7.57 -p <span style="color:#0000cf;font-weight:bold">9008</span> -n <span style="color:#0000cf;font-weight:bold">1000</span> -c <span style="color:#0000cf;font-weight:bold">100</span> --dbnum <span style="color:#0000cf;font-weight:bold">1</span>  -d <span style="color:#0000cf;font-weight:bold">20480</span> -q</code></pre></div>
<p>参数介绍：</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">-h ：指定redis连接地址
-p ：指定redis连接端口号
-a ：指定redis连接密码
-n ：指定redis压测请求key数量
-c ：指定并发连接客户端数量
-t ：指定要测试的命令类型，不加-t为测试全部
–dbnum ：指定测试数据存放的数据库编号
-d ：指定测试单个key的大小
-q ：静默模式，只输出测试结果</code></pre></div>
<p>压测结果</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">root@813e5be9bd15:/# vire-benchmark -h 10.4.7.57 -p <span style="color:#0000cf;font-weight:bold">9008</span> -n <span style="color:#0000cf;font-weight:bold">1000</span> -c <span style="color:#0000cf;font-weight:bold">100</span> --dbnum <span style="color:#0000cf;font-weight:bold">1</span>  -d <span style="color:#0000cf;font-weight:bold">20480</span> -q
PING_INLINE: 4424.78 requests per second
PING_BULK: 5154.64 requests per second
SET: 788.64 requests per second
GET: 4901.96 requests per second
INCR: 6211.18 requests per second
MSET <span style="color:#ce5c00;font-weight:bold">(</span><span style="color:#0000cf;font-weight:bold">10</span> keys<span style="color:#ce5c00;font-weight:bold">)</span>: 149.43 requests per second
MGET <span style="color:#ce5c00;font-weight:bold">(</span><span style="color:#0000cf;font-weight:bold">10</span> keys<span style="color:#ce5c00;font-weight:bold">)</span>: 212.40 requests per second
MGET <span style="color:#ce5c00;font-weight:bold">(</span><span style="color:#0000cf;font-weight:bold">100</span> keys<span style="color:#ce5c00;font-weight:bold">)</span>: 29.89 requests per second
MGET <span style="color:#ce5c00;font-weight:bold">(</span><span style="color:#0000cf;font-weight:bold">200</span> keys<span style="color:#ce5c00;font-weight:bold">)</span>: 11.56 requests per second
LPUSH: 1064.96 requests per second
RPUSH: 1030.93 requests per second
LPOP: 4132.23 requests per second
RPOP: 4716.98 requests per second
LPUSH <span style="color:#ce5c00;font-weight:bold">(</span>needed to benchmark LRANGE<span style="color:#ce5c00;font-weight:bold">)</span>: 696.92 requests per second
LRANGE_10 <span style="color:#ce5c00;font-weight:bold">(</span>first <span style="color:#0000cf;font-weight:bold">10</span> elements<span style="color:#ce5c00;font-weight:bold">)</span>: 5917.16 requests per second
LRANGE_100 <span style="color:#ce5c00;font-weight:bold">(</span>first <span style="color:#0000cf;font-weight:bold">100</span> elements<span style="color:#ce5c00;font-weight:bold">)</span>: 5050.50 requests per second
LRANGE_300 <span style="color:#ce5c00;font-weight:bold">(</span>first <span style="color:#0000cf;font-weight:bold">300</span> elements<span style="color:#ce5c00;font-weight:bold">)</span>: 5102.04 requests per second
LRANGE_450 <span style="color:#ce5c00;font-weight:bold">(</span>first <span style="color:#0000cf;font-weight:bold">450</span> elements<span style="color:#ce5c00;font-weight:bold">)</span>: 5434.78 requests per second
LRANGE_600 <span style="color:#ce5c00;font-weight:bold">(</span>first <span style="color:#0000cf;font-weight:bold">600</span> elements<span style="color:#ce5c00;font-weight:bold">)</span>: 4901.96 requests per second
SADD: 1234.57 requests per second
SPOP: 5586.59 requests per second
HSET: 1308.90 requests per second
HINCRBY: 5681.82 requests per second
HINCRBYFLOAT: 5376.34 requests per second
HGET: 5347.59 requests per second
HMSET <span style="color:#ce5c00;font-weight:bold">(</span><span style="color:#0000cf;font-weight:bold">10</span> fields<span style="color:#ce5c00;font-weight:bold">)</span>: 121.92 requests per second
HMGET <span style="color:#ce5c00;font-weight:bold">(</span><span style="color:#0000cf;font-weight:bold">10</span> fields<span style="color:#ce5c00;font-weight:bold">)</span>: 5813.95 requests per second
HGETALL: 4484.30 requests per second
ZADD: 1183.43 requests per second
ZREM: 1305.48 requests per second
PFADD: 1290.32 requests per second
PFCOUNT: 5813.95 requests per second
PFADD <span style="color:#ce5c00;font-weight:bold">(</span>needed to benchmark PFMERGE<span style="color:#ce5c00;font-weight:bold">)</span>: 1293.66 requests per second
PFMERGE: 5952.38 requests per second</code></pre></div>
    </div>
    <footer class="post-footer">
     
 
<div class="post-tags">     
     
    <a href="http://www.shutdown.cn/tags/redis" rel="tag" title="redis">#redis#</a>
    
    <a href="http://www.shutdown.cn/tags/vire-benchmark" rel="tag" title="vire-benchmark">#vire-benchmark#</a>
    
    <a href="http://www.shutdown.cn/tags/docker" rel="tag" title="docker">#docker#</a>
    
    <a href="http://www.shutdown.cn/tags/%e5%8e%8b%e5%8a%9b%e6%b5%8b%e8%af%95" rel="tag" title="压力测试">#压力测试#</a>
    
</div>



     <div class="post-nav">
    <div class="post-nav-next post-nav-item">
    
        <a href="http://www.shutdown.cn/post/libc-so-6-version-glibc_2_14-not-found-problem-issue/" rel="next" title="libc.so.6: version ‘GLIBC_2.14’ not found问题解决">
        <i class="fa fa-chevron-left"></i> libc.so.6: version ‘GLIBC_2.14’ not found问题解决
        </a>
    
    </div>

    <div class="post-nav-prev post-nav-item">
    
        <a href="http://www.shutdown.cn/post/centos-configure-inland-yum-repo-and-epel-repo/" rel="prev" title="Centos7配置国内yum源和epel源">
        Centos7配置国内yum源和epel源 <i class="fa fa-chevron-right"></i>
        </a>
    
    </div>
</div>
      
     
     
     






    </footer>
  </article>
</section>

          </div>
        </div>
        <div class="sidebar-toggle">
  <div class="sidebar-toggle-line-wrap">
    <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
    <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
    <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
  </div>
</div>
<aside id="sidebar" class="sidebar">
  <div class="sidebar-inner">

  <ul class="sidebar-nav motion-element">
    <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
      文章目录
    </li>
    <li class="sidebar-nav-overview" data-target="site-overview">
      站点概览
    </li>
  </ul>

    <section class="site-overview sidebar-panel ">
      <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image"
        src="http://www.shutdown.cn/img/author.jpg"
        alt="不与天斗Domino" />
    <p class="site-author-name" itemprop="name">不与天斗Domino</p>
    <p class="site-description motion-element" itemprop="description"> 
        Programmer &amp; Architect</p>
</div>
      <nav class="site-state motion-element">
    <div class="site-state-item site-state-posts">
      <a href="http://www.shutdown.cn/post/">
        <span class="site-state-item-count">183</span>
        <span class="site-state-item-name">日志</span>
      </a>
    </div>
    <div class="site-state-item site-state-categories">    
        <a href="http://www.shutdown.cn/categories/">      
         
        <span class="site-state-item-count">15</span>
        
        <span class="site-state-item-name">分类</span>
        
        </a>
    </div>

    <div class="site-state-item site-state-tags">
        <a href="http://www.shutdown.cn/tags/">
         
        <span class="site-state-item-count">224</span>
        
        <span class="site-state-item-name">标签</span>
        </a>
    </div>
</nav>
      
      

      

      <div class="links-of-blogroll motion-element inline">
<script type="text/javascript" src="//rf.revolvermaps.com/0/0/8.js?i=&amp;m=0&amp;s=220&amp;c=ff0000&amp;cr1=ffffff&amp;f=arial&amp;l=33&amp;bv=35" async="async"></script>
</div>

    </section>
    
<section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
    <div class="post-toc">
        <div class="post-toc-content"></div>
    </div>
</section>

  </div>
</aside>

      </div>
    </main>
   
    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  <span itemprop="copyrightYear">  &copy; 
  2013 - 2023</span>
  <span class="with-love"><i class="fa fa-heart"></i></span>
  <span class="author" itemprop="copyrightHolder">天地维杰网</span>
  <span class="icp" itemprop="copyrightHolder"><a href="https://beian.miit.gov.cn/" target="_blank">京ICP备13019191号-1</a></span>
</div>
<div class="powered-by">
  Powered by - <a class="theme-link" href="http://gohugo.io" target="_blank" title="hugo" >Hugo v0.63.2</a>
</div>
<div class="theme-info">
  Theme by - <a class="theme-link" href="https://github.com/xtfly/hugo-theme-next" target="_blank"> NexT
  </a>
</div>


      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
      <span id="scrollpercent"><span>0</span>%</span>
    </div>
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>
<script type="text/javascript" src="http://www.shutdown.cn/js/vendor/jquery/index.js?v=2.1.3"></script>
<script type="text/javascript" src="http://www.shutdown.cn/js/vendor/fastclick/lib/fastclick.min.js?v=1.0.6"></script> 
<script type="text/javascript" src="http://www.shutdown.cn/js/vendor/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
<script type="text/javascript" src="http://www.shutdown.cn/js/vendor/velocity/velocity.min.js?v=1.2.1"></script>
<script type="text/javascript" src="http://www.shutdown.cn/js/vendor/velocity/velocity.ui.min.js?v=1.2.1"></script>
<script src="http://www.shutdown.cn/js/vendor/ua-parser-js/dist/ua-parser.min.js?v=0.7.9"></script>

<script src="http://www.shutdown.cn/js/vendor/fancybox/jquery.fancybox.pack.js?v=2.1.5"></script>

<script type="text/javascript" src="http://www.shutdown.cn/js/utils.js"></script>
<script type="text/javascript" src="http://www.shutdown.cn/js/motion.js"></script>
<script type="text/javascript" src="http://www.shutdown.cn/js/affix.js"></script>
<script type="text/javascript" src="http://www.shutdown.cn/js/schemes/pisces.js"></script>

<script type="text/javascript" src="http://www.shutdown.cn/js/scrollspy.js"></script>
<script type="text/javascript" src="http://www.shutdown.cn/js/post-details.js"></script>
<script type="text/javascript" src="http://www.shutdown.cn/js/toc.js"></script>

<script type="text/javascript" src="http://www.shutdown.cn/js/bootstrap.js"></script>

<script type="text/javascript" src="http://www.shutdown.cn/js/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX", "output/HTML-CSS"],
    tex2jax: {
      inlineMath: [ ['$','$'] ],
      displayMath: [ ['$$','$$'] ],
      processEscapes: true
    },
    "HTML-CSS": { fonts: ["TeX"] }
  });
</script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML' async></script>
</body>
</html>